<p>Illustrates custom validation, you have to select time between 12:00 and 13:59</p>

<div class="form-group" [class.has-success]="ctrl.valid" [class.has-danger]="!ctrl.valid">
  <ngb-timepicker [(ngModel)]="time" [formControl]="ctrl" required></ngb-timepicker>
  <div class="form-control-feedback">
    <div *ngIf="ctrl.valid">Great choice</div>
    <div *ngIf="ctrl.errors && ctrl.errors['required']">Select some time during lunchtime</div>
    <div *ngIf="ctrl.errors && ctrl.errors['tooLate']">Oh no, it's way too late</div>
    <div *ngIf="ctrl.errors && ctrl.errors['tooEarly']">It's a bit too early</div>
  </div>
</div>

<hr>
<pre>Selected time: {{time | json}}</pre>
